package com.songlanyun.modules.marketing.seckill.controller.api;

import com.songlanyun.common.enums.OrderConstant;
import com.songlanyun.common.exception.RRException;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.common.utils.R;
import com.songlanyun.common.validator.ValidatorUtils;
import com.songlanyun.modules.account.controller.common.AbstractApiController;
import com.songlanyun.modules.exception.MarketingException;
import com.songlanyun.modules.marketing.seckill.entity.SeckillActivity;
import com.songlanyun.modules.marketing.seckill.model.dto.SeckillActivityDTO;
import com.songlanyun.modules.marketing.seckill.model.vo.SeckillActivityGoodsVO;
import com.songlanyun.modules.marketing.seckill.service.SeckillActivityService;
import com.songlanyun.modules.user.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;
import java.util.Map;


/**
 * 秒杀活动表
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-23 17:30:11
 */
@RestController
@RequestMapping("api/marketing/seckillactivity")
public class SeckillActivityApiController extends AbstractApiController {
    @Autowired
    private SeckillActivityService seckillActivityService;


    /**
     * 查询秒杀活动的时间信息
     */
    @GetMapping("/info/{id}")
//    @RequiresPermissions("seckill:seckillActivity:info")
    public R info(@PathVariable("id") Long id) {
        SeckillActivity seckillActivity = seckillActivityService.getInfoById(id);

        return R.ok().put("data", seckillActivity);
    }


}
